package mint.modules.symbol;

import java.util.Formatter;

import mint.modules.generator.FormalParameterNode;
import mint.modules.type.Type;

public class ParameterSymbol extends Symbol {
	private Type type;
	private int number;
	
	public ParameterSymbol(FormalParameterNode parameter, int paramNumber)
	{
		super(parameter.getName());
		type = parameter.getType();
		number = paramNumber;
	}

	@Override
	public SymbolType getSymbolType() {
		return SymbolType.Parameter;
	}

	@Override
	public void print(Formatter output, int tabSize) {
		for(int i = 1; i <= tabSize; i++)
		{
			output.format("\t");
		}
		output.format("%s : %s", getName(), type.getName());
	}
	
	public Type getType()
	{
		return type;
	}
	
	public int getNumber()
	{
		return number;
	}

}
